package com.cefa.finance.model;

import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

@Entity
@Table(name = "cefa_finance_file_block_data")
public class FileContractBlockData {

    private Long id;
    private Long contractId;
    private Long userId;
    private Long vehicleId;
    private String contractName;
    private String originContractName;
    private Date blockRegTime;


    private Boolean blockStatus;
    private String blockHash;
    private String blockNumber;
    private String transactionHash;
    private String sha3data;



    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getContractId() {
        return contractId;
    }

    public void setContractId(Long contractId) {
        this.contractId = contractId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getVehicleId() {
        return vehicleId;
    }

    public void setVehicleId(Long vehicleId) {
        this.vehicleId = vehicleId;
    }

    public String getBlockHash() {
        return blockHash;
    }

    public void setBlockHash(String blockHash) {
        this.blockHash = blockHash;
    }

    public String getBlockNumber() {
        return blockNumber;
    }

    public void setBlockNumber(String blockNumber) {
        this.blockNumber = blockNumber;
    }


    public String getTransactionHash() {
        return transactionHash;
    }

    public void setTransactionHash(String transactionHash) {
        this.transactionHash = transactionHash;
    }

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getBlockRegTime() {
        return blockRegTime;
    }

    public void setBlockRegTime(Date blockRegTime) {
        this.blockRegTime = blockRegTime;
    }

    public String getContractName() {
        return contractName;
    }

    public void setContractName(String contractName) {
        this.contractName = contractName;
    }

    public String getOriginContractName() {
        return originContractName;
    }

    public void setOriginContractName(String originContractName) {
        this.originContractName = originContractName;
    }

    public Boolean getBlockStatus() {
        return blockStatus;
    }

    public void setBlockStatus(Boolean blockStatus) {
        this.blockStatus = blockStatus;
    }

    public String getSha3data() {
        return sha3data;
    }

    public void setSha3data(String sha3data) {
        this.sha3data = sha3data;
    }
}
